function IsTaskSelected(const Tasks: String): Boolean;
Returns True if the specified task is selected. Multiple tasks may be specified in the same manner as in a Tasks parameter.
begin if IsTaskSelected('desktopicon') then // the 'desktopicon' task is selected end;